//
//  Stream.h
//  DesignMode
//
//  Created by wangzhipan on 2024/9/10.
//

#import <Foundation/Foundation.h>
#import "IStream.h"

@interface FileStream : NSObject<IStream>
@end


@interface MemoryStream : NSObject<IStream>
@end

@interface NetworkStream : NSObject<IStream>
@end


/*
 这个时候，如果有加密、解密、缓冲 stream等功能，继续继承体系走下去，子类会急剧膨胀：
 */
@interface EncryptFileStream : FileStream
@end

@interface DecodeFileStream: FileStream
@end

@interface BufferFileStream : FileStream
@end

//同样内存流也要这么处理
@interface EncryptMemoryStream : MemoryStream
@end

@interface DecodeMemoryStream : MemoryStream
@end

@interface BufferMemoryStream : MemoryStream
@end

//网络流也是一样
@interface EncryptNetworkStream : NetworkStream
@end

@interface DecodeNetworkStream : NetworkStream
@end

@interface BufferNetworkStream : NetworkStream
@end
